//
//  FuelMgr.h
//  carcareIOS
//
//  Created by ileo on 16/4/12.
//  Copyright © 2016年 chezheng. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "FuelMonthModel.h"
#import "FuelPriceModel.h"

extern NSString * const FUEL_UPDATE;

@interface FuelMgr : NSObject

DEF_SINGLETON

#pragma mark - 默认配置
@property (nonatomic, readonly) NSString *showChoiceCity;//用于显示选择的城市

@property (nonatomic, assign) BOOL hasDefault;//是否有默认设置

@property (nonatomic, copy) NSString *choiceProvince;//省份
@property (nonatomic, copy) NSString *choiceCity;//城市
@property (nonatomic, strong) FuelPriceModel *choiceFuelPriceModel;//选择油号

@property (nonatomic , strong) FuelRecordModel * choiceRecordModel;//选择的加油明细的model

-(void)resetDefaultSuccess:(void (^)())success fail:(void (^)())fail;//重新设置油价
-(void)cancelResetDefault;//重新设置油价取消

-(void)getFuelPriceSuccess:(void (^)(NSArray *prices))success fail:(void (^)())fail;//获取油价列表

#pragma mark - 选择月份纪录

@property (nonatomic, copy) NSArray *months;
@property (nonatomic, strong) DateModel *currentMonth;//当前选中月

@property (nonatomic, assign) CGFloat maxFuelCost;//最大金额

-(void)addLastMonthCallback:(void (^)(BOOL succ))callback;
-(void)addNextMonthCallback:(void (^)(BOOL succ))callback;

-(FuelMonthModel *)fuelModelWithMonthModel:(DateModel *)dateModel;//返回车辆累计加油等信息
-(NSInteger)indexWithDateModel:(DateModel *)dateModel;

-(void)addNewFuelRecord:(FuelRecordModel *)model succ:(void(^)())succ fail:(void(^)())fail;//添加新加油纪录
-(void)updateFuelRecord:(FuelRecordModel *)model succ:(void(^)())succ fail:(void(^)())fail;//修改加油纪录
-(void)deleteFuelRecord:(FuelRecordModel *)model succ:(void(^)())succ fail:(void(^)())fail;//删除加油纪录

#pragma mark -
-(void)getRecentlyFuelDate:(void (^)(NSString *date))callBack;//得到最近加油时间

#pragma mark - 
-(void)readNewFuelRecord:(FuelRecordModel *)model;//标志为已读  点击后调用

#pragma mark - h5
@property (nonatomic, assign) NSInteger choiceYear;//选择统计年份
@property (nonatomic, copy) NSArray *years;//可选择年份
@property (nonatomic, readonly) NSString *h5Link;//h5链接

@end
